Hello everyone, I have a question about Ole Objects in general and how to open pdf files with DXL Code. Until now I tried to avoid the field of Ole object first because I don't needed it and second because this topic is barely documented. Furthermore, I couldn't find any document on the basics of Ole objects to understand how this system works. Instead I found some code fragments i.e how to open a word document with Ole. And now my questions. At first does anyone know a reliable source with information which helps to understand the basics of Ole objects? The second question is more specific because I need it for a script. Is it possible to open a PDF document from DXL code? Something like the code I found where I was able to open a word document in the word.exe from the DXL code. Thank you in advance. Best wishes, Patrick
Patrick_1 - Tue Apr 23 08:35:54 EDT 2019 |
Re: Basics on OLE Obj/Opening PDF files via DXL You can use Mathias's shell.inc (available here). Then you can build a command string to pass to the createShell() function in shell.inc. Here is an example I did to open a specific page of a PDF file and to a specific position on that page (not sure if I have order of vertical/horizontal arguments correct...you can google to see available options for acroread command: int page const string acroRdExe="C:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe" int horizOffset int vertOffset string fileName //...calculate desired values string dc="\"" acroRdExe "\" /N /S /A " "\"" "page=" page "&pagemode=thumbs&toolbar=0&statusbar=0&messages=0&zoom=225," horizOffset "," vertOffset "\" \"" fileName "\"" Shell pdfmdShell=createShell(dc,false)
|